public class TestMyArrays {
    public static void main(String[] args) {
        int[] nums = {1, 2, 3, 4, 5};
        int sum = MyArrays.getSum(nums);
        System.out.println("sum = " + sum);

        double[] price = {5.6, 9.9, 10.0};
      //  MyArrays.getSum(price);//报错， price数组是double[]类型，getSum要的是int[]类型
    }
}
